package com.itheima.math;

public class Test {
    public static void main(String[] args) {
        int abs = Math.abs(-66);
        System.out.println("abs = " + abs);

        double floor = Math.floor(5.99);
        System.out.println("floor = " + floor);

        double ceil = Math.ceil(5.01);
        System.out.println("ceil = " + ceil);
        //使用Math方法生成一个[1,100]之间的随机整数
        for (int i = 0;i <10;i++) {
            double v = Math.random()*100+1;
            int a = (int)v;
            System.out.println("a = " + a);
        }

        double pow = Math.pow(3, 4);
        System.out.println("pow = " + pow);
    }
}
